home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1993 / MacHack 1993.toast / MacHack™ 1987-1992 / MacHack™ '90 / Utilities ƒ / MPW Tools ƒ / Simula4.07 / Simula 4.07ƒ / SInterfaces / macDialogAlert.sim < prev    next >
Encoding:
Text File  |  1989-05-01  |  1.6 KB  |  58 lines  |  [TEXT/MPS ]

  1. % ---------------------------------------------------------------------------
  2. %    Class MACDialogAlert
  3. % In this module you find the programmers interface to Dialogs and Alerts.
  4. % It is built on top of the TOOLBOX routines in TOOLBOXDialog.
  5. % For a description of the routines see Inside Macintosh, chapter 13.
  6. % MacDialogAlert is only used as prefix on MacDialog and MacAlert
  7. %
  8. % 890317/Boris Magnusson
  9. % 890412/Göran Eriksson
  10. %
  11. % ---------------------------------------------------------------------------
  12.  
  13. external text procedure Text_String="::SInterfaces:Text_String";
  14. external text procedure String_Text="::SInterfaces:String_Text";
  15. external class MACPoint="::SInterfaces:MACPoint";
  16. external class MACRect="::SInterfaces:MACRect";
  17. external class MACWindow="::SInterfaces:MACWindow";
  18. external class ToolboxDialog="::SInterfaces:ToolboxDialog";
  19. MacWindow class MacDialogAlert;
  20. begin
  21.         ref(ToolboxDialog) TD;
  22.  
  23.                      
  24. %    PROCEDURE SetIText(item: Handle; text: Str255);
  25.     PROCEDURE SetIText(item, text255);
  26.             value text255;
  27.             integer item;
  28.             text text255;
  29.         begin
  30.             text Temp;
  31.             temp:-text_String(text255);
  32.             TD.ToolboxSetIText(item, temp);
  33.         end;
  34.  
  35. %    PROCEDURE GetIText(item: Handle; VAR text: Str255);
  36.     PROCEDURE GetIText(item, text255);
  37.             name text255;
  38.             integer item;
  39.             text text255;
  40.         begin
  41.             text Temp;
  42.             temp:-text_String(text255);
  43.             TD.ToolboxGetIText(item, temp);
  44.             text255:-String_Text(Temp);
  45.         end;
  46.  
  47. %    {routines designed only for use in Pascal}
  48.  
  49. %    FUNCTION GetAlrtStage: INTEGER;
  50. %    external Toolbox procedure x="$3EB8, $0A9A" is
  51.  
  52. %    PROCEDURE ResetAlrtStage;
  53. %    external Toolbox procedure x="$4278, $0A9A" is
  54.  
  55.         TD:-new ToolboxDialog;
  56.  
  57. end;